<?php


namespace app\common\cachemodel;


use app\common\model\BaseCache;

class MiniChannel extends BaseCache
{
    protected $table = 'wechat_backup_07_18_14_43_00.mini_channel';

    protected $cacheModel = 'mini.channel';

    /**
     * 缓存渠道信息
     * @param $ids
     * @param $type
     * @param $sortType
     * @return array
     */
    public function getInfoByIdsInData($ids, $type, $sortType): array
    {
        try
        {
            $data = $this->where('id', 'in', $ids)->where('status', 1)->column('type,name,desc,address,ad_unit_id,is_show_download_bar', 'id');
        }
        catch (\Exception $e)
        {
            $data = [];
        }

        return $data;
    }
}
